package com.sdy.usercenter.biz.service;

import com.sdy.common.model.BizException;
import com.sdy.usercenter.biz.model.SysResource;
import com.sdy.mvc.service.BaseService;

import java.util.List;

/**
 * <p>
 * 系统资源表 服务类
 * </p>
 *
 * @author zzq
 * @since 2019-06-14
 */
public interface SysResourceService extends BaseService<SysResource> {

    List<SysResource> findResourceWithAuthByRoleId(Integer roleId);

    /**
     * 获取资源-tree
     */
    SysResource appTreeData(String appCode, Boolean validOnly) throws BizException;

    /**
     * 获取资源-tree
     */
    SysResource appTreeDataWithAuth(String appCode, Integer roleId) throws BizException;

    /**
     * 创建资源
     */
    void createResource(SysResource resource) throws BizException;

    /**
     * 更新资源
     */
    void updateResource(SysResource resource) throws BizException;

    /**
     * 删除资源
     */
    void deleteResource(List<Integer> ids);
}
